using System;
using System.Windows;

namespace 修为尽失.辅助
{
    public static class MessageHelper
    {
        public static void _尚未实现()
        {
            MessageBox.Show("尚未实现！");
        }

        public static void ShowException(this Exception ex)
        {
            MessageBox.Show(ex.ToLogString(), "出错了", MessageBoxButton.OK, MessageBoxImage.Error);
        }
        public static void ShowWarning(string msg,string title="警告")
        {
            MessageBox.Show(msg??"", title, MessageBoxButton.OK, MessageBoxImage.Warning);
        }
        public static void ShowError(string msg,string title="错误")
        {
            MessageBox.Show(msg ??"", title, MessageBoxButton.OK, MessageBoxImage.Error);
        }
        public static void ShowInfo(string msg,string title="信息")
        {
            MessageBox.Show(msg ??"", title, MessageBoxButton.OK, MessageBoxImage.Information);
        }
        public static class Messaging
        {
            public static string ArgumentNotNull = "{0}参数不可为NULL。";
            public static string ArgumentNotNullOrEmpty = "{0}参数不可为NULL或者空字符。";
            public static string Compare = "{0} 必须为 {1} 到 {2}之间的值。";
            public static string DateTimeRequired = "{0} 的值为NULL或者不是有效的日期值。";
            public static string Default = "{0} 不是有效的值。";
            public static string FileMustExist = "不存在指定文件{0}。";
            public static string Length = "{0} 长度必须介于 {1} 与 {2}之间。";
            public static string NotEmpty = "{0} 不能为空字符串。";
            public static string Range = "{0} 必须介于 {1} 与 {2}之间。";
            public static string Regex = "{0} 必须匹配表达式 {1}.";
            public static string Required = "{0} 为NULL或者不是有效的值。";
            public static string StringRequired = "{0} 的值为NULL或者是空字符。";
        }
    }
    
}